package cn.newhopedairy.order.applicationc.impl;

import cn.newhopedairy.order.applicationc.MainOrderCmdService;
import cn.newhopedairy.order.command.MainOrderCmd;
import cn.newhopedairy.order.domain.aggregate.MainOrder;
import cn.newhopedairy.order.domain.service.MainOrderService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Neo.Li
 * @date 2020-09-0917:19
 */
@Service
public class MainOrderCmdServiceImpl implements MainOrderCmdService {
    private static Logger log = LoggerFactory.getLogger(MainOrderCmdServiceImpl.class);

    @Autowired
    private MainOrderService mainOrderService;

//    @Resource
//    private DeliveryOrderApi deliveryOrderApi;

    @Override
    public String placeAnOrder(MainOrderCmd mainOrderCmd) {
//        List<DeliveryOrderResp> list = deliveryOrderApi.getOrders();
        log.info("[in][配送单调用][data={}]", "hehehe");

        MainOrder mainOrder = new MainOrder();
        return mainOrderService.placeAnOrder(mainOrder);
    }
}
